// JavaScript Document
//首页UI相关的自定义函数

function scaleNum(number, decimals){
	var n = +number || 0,
		d = (typeof(decimals)==='undefined' || decimals===null ||  decimals < 0) ? -1 : parseInt(decimals),
		c = d === -1 ? (n.toString().split('.')[1] || '').length : (isNaN(d = Math.abs(d)) ? 2 : d),
		s = n < 0 ? "-" : "",
		i = String(parseInt(n = Math.abs(n).toFixed(c))),
		j = i.length > 3 ? i.length % 3 : 0;
	return s + i + (c ? '.' + Math.abs(n - i).toFixed(c).slice(2) : "");
};


var UiFunc={};

//调试
UiFunc.debug = function(item, itemIndex){
	alert(item.name);
};

